import Vue from 'vue';
import VueRouter from 'vue-router';
import index from '../views/index.vue'
import login from '../views/account/login.vue';
Vue.use(VueRouter)

const routes = [
	// 主页
	{
		path: '/',
		name: 'index',
		component: index
	},
	// 登录
	{
		path: '/account/login',
		name: 'login',
		component: login
	},
	// 忘记密码
	{
		path: '/account/forgot',
		name: 'forgot',
		component: () => import('../views/account/forgot.vue')
	},
	// 注册账号
	{
		path: '/account/register',
		name: 'register',
		component: () => import('../views/account/register.vue')
	},
		// 媒体图片
	{
		path: '/media/image',
		name: 'media_image',
		component: () => import('../views/media/image.vue')
	},
	// 音乐
	{
		path: '/media/music',
		name: 'media_music',
		component: () => import('../views/media/music.vue')
	},
	// 媒体视频
	{
		path: '/media/video',
		name: 'media_video',
		component: () => import('../views/media/video.vue')
	},
	// 媒体视频
	{
		path: '/user_center/index',
		name: 'user_center_index',
		component: () => import('../views/user_center/index.vue')
	},
	// 文章路由
	{
		path: '/article/list',
		name: 'article_list',
		component: () => import('../views/article/list.vue')
	},
	{
		path: '/article/details',
		name: 'article_details',
		component: () => import('../views/article/details.vue')
	},
	// 浏览网站
	// 收藏路由
	{
		path: '/user/collect',
		name: 'collect_list',
		component: () => import('../views/user/collect.vue')
	},


	{
		path: '/comment/table',
		name: 'comment_table',
		component: () => import('../views/comment/table.vue')
	},
	{
		path: '/comment/view',
		name: 'comment_view',
		component: () => import('../views/comment/view.vue')
	},

	// 考试路由
	{
		path: '/exam/list',
		name: 'exam_list',
		component: () => import('../views/exam/list.vue')
	},

	{
		path: '/exam/details',
		name: 'exam_details',
		component: () => import('../views/exam/details.vue')
	},
	// 考试路由
	{
		path: '/exam/table',
		name: 'exam_table',
		component: () => import('../views/exam/table.vue')
	},
	{
		path: '/exam/view',
		name: 'exam_view',
		component: () => import('../views/exam/view.vue')
	},
	{
		path: '/question_table/table',
		name: 'question_table_table',
		component: () => import('../views/exam/question_table.vue'),
		meta: {
			index: 0,
			title: '题库列表'
		}
	},
	{
		path: '/question_table/table',
		name: 'question_table_table',
		component: () => import('../views/exam/question_table.vue'),
		meta: {
			index: 0,
			title: '题库列表'
		}
	},
	{
		path: '/question_view/view',
		name: 'question_view_view',
		component: () => import('../views/exam/question_view.vue'),
		meta: {
			index: 0,
			title: '题库详情'
		}
	},
	{
		path: '/score_table/table',
		name: 'score_table_table',
		component: () => import('../views/exam/score_table.vue'),
		meta: {
			index: 0,
			title: '评分列表'
		}
	},
	{
		path: '/score_view/view',
		name: 'score_view_view',
		component: () => import('../views/exam/score_view.vue'),
		meta: {
			index: 0,
			title: '评分详情'
		}
	},
	{
		path: '/answer_view/view',
		name: 'answer_view_view',
		component: () => import('../views/exam/answer_view.vue'),
		meta: {
			index: 0,
			title: '评分详情'
		}
	},
	


	{
		path: '/chat',
		name: 'chat',
		component: () => import('../views/chat/index.vue')
	},

	// 公告路由
	{
		path: '/notice/list',
		name: 'notice_list',
		component: () => import('../views/notice/list.vue')
	},
	{
		path: '/notice/details',
		name: 'notice_details',
		component: () => import('../views/notice/details.vue')
	},
	// 教师用户表格路由
	{
		path: '/teacher_users/table',
		name: '/teacher_users_table',
		component: () => import('../views/teacher_users/table.vue')
	},
	// 教师用户详情路由
	{
		path: '/teacher_users/view',
		name: '/teacher_users_view',
		component: () => import('../views/teacher_users/view.vue')
	},
	
	
		
		
		
	// 学生用户表格路由
	{
		path: '/student_users/table',
		name: '/student_users_table',
		component: () => import('../views/student_users/table.vue')
	},
	// 学生用户详情路由
	{
		path: '/student_users/view',
		name: '/student_users_view',
		component: () => import('../views/student_users/view.vue')
	},
	
	
		
		
		
	// 诈骗分类表格路由
	{
		path: '/fraud_classification/table',
		name: '/fraud_classification_table',
		component: () => import('../views/fraud_classification/table.vue')
	},
	// 诈骗分类详情路由
	{
		path: '/fraud_classification/view',
		name: '/fraud_classification_view',
		component: () => import('../views/fraud_classification/view.vue')
	},
	
	
		
		
		
	// 诈骗知识表格路由
	{
		path: '/fraud_knowledge/table',
		name: '/fraud_knowledge_table',
		component: () => import('../views/fraud_knowledge/table.vue')
	},
	// 诈骗知识详情路由
	{
		path: '/fraud_knowledge/view',
		name: '/fraud_knowledge_view',
		component: () => import('../views/fraud_knowledge/view.vue')
	},
	
		// 诈骗知识列表路由
	{
		path: '/fraud_knowledge/list',
		name: '/fraud_knowledge_list',
		component: () => import('../views/fraud_knowledge/list.vue')
	},
	
		// 诈骗知识详情路由
	{
		path: '/fraud_knowledge/details',
		name: '/fraud_knowledge_details',
		component: () => import('../views/fraud_knowledge/details.vue')
	},
		
		
		
	// 诈骗案例表格路由
	{
		path: '/fraud_case/table',
		name: '/fraud_case_table',
		component: () => import('../views/fraud_case/table.vue')
	},
	// 诈骗案例详情路由
	{
		path: '/fraud_case/view',
		name: '/fraud_case_view',
		component: () => import('../views/fraud_case/view.vue')
	},
	
		// 诈骗案例列表路由
	{
		path: '/fraud_case/list',
		name: '/fraud_case_list',
		component: () => import('../views/fraud_case/list.vue')
	},
	
		// 诈骗案例详情路由
	{
		path: '/fraud_case/details',
		name: '/fraud_case_details',
		component: () => import('../views/fraud_case/details.vue')
	},
		
		
		
	// 宣传教育表格路由
	{
		path: '/publicity_and_education/table',
		name: '/publicity_and_education_table',
		component: () => import('../views/publicity_and_education/table.vue')
	},
	// 宣传教育详情路由
	{
		path: '/publicity_and_education/view',
		name: '/publicity_and_education_view',
		component: () => import('../views/publicity_and_education/view.vue')
	},
	
		// 宣传教育列表路由
	{
		path: '/publicity_and_education/list',
		name: '/publicity_and_education_list',
		component: () => import('../views/publicity_and_education/list.vue')
	},
	
		// 宣传教育详情路由
	{
		path: '/publicity_and_education/details',
		name: '/publicity_and_education_details',
		component: () => import('../views/publicity_and_education/details.vue')
	},
		
		
		
	// 交流分类表格路由
	{
		path: '/communication_classification/table',
		name: '/communication_classification_table',
		component: () => import('../views/communication_classification/table.vue')
	},
	// 交流分类详情路由
	{
		path: '/communication_classification/view',
		name: '/communication_classification_view',
		component: () => import('../views/communication_classification/view.vue')
	},
	
	
		
		
		
	// 社区交流表格路由
	{
		path: '/community_communication/table',
		name: '/community_communication_table',
		component: () => import('../views/community_communication/table.vue')
	},
	// 社区交流详情路由
	{
		path: '/community_communication/view',
		name: '/community_communication_view',
		component: () => import('../views/community_communication/view.vue')
	},
	
		// 社区交流列表路由
	{
		path: '/community_communication/list',
		name: '/community_communication_list',
		component: () => import('../views/community_communication/list.vue')
	},
	
		// 社区交流详情路由
	{
		path: '/community_communication/details',
		name: '/community_communication_details',
		component: () => import('../views/community_communication/details.vue')
	},
		
		
		
	// 举报信息表格路由
	{
		path: '/report_information/table',
		name: '/report_information_table',
		component: () => import('../views/report_information/table.vue')
	},
	// 举报信息详情路由
	{
		path: '/report_information/view',
		name: '/report_information_view',
		component: () => import('../views/report_information/view.vue')
	},
		// 举报信息添加路由
	{
		path: '/report_information/edit',
		name: '/report_information_edit',
		component: () => import('../views/report_information/edit.vue')
	},
	
	
		
		
		

	// 用户路由
	{
		path: '/user/index',
		name: 'user_index',
		component: () => import('../views/user/index.vue')
	},
	// 基本信息
	{
		path: '/user/info',
		name: 'user_info',
		component: () => import('../views/user/info.vue')
	},
	// 找回密码
	{
		path: '/user/password',
		name: 'user_password',
		component: () => import('../views/user/password.vue')
	},

	// 搜索
	{
		path: '/search',
		name: 'search',
		component: () => import('../views/search/index.vue')
	},
	// 局部搜索
	{
		path: '/search/details',
		name: 'search_details',
		component: () => import('../views/search/details.vue')
	}
]

const router = new VueRouter({
	mode: 'hash',
	base: process.env.BASE_URL,
	routes
})

router.afterEach((to, from, next) => {
	let title = "校园防诈骗宣传系统-home";
	document.title = title;
	document.logo = "校园防诈骗宣传系统"
})

export default router
